bitkeeper revision 1.1159.258.104 (42642dba9pDTa93gTC3Il_J65x4vUQ)
authoriap10@freefall.cl.cam.ac.uk <iap10@freefall.cl.cam.ac.uk>
Mon, 18 Apr 2005 21:59:22 +0000 (21:59 +0000)
committeriap10@freefall.cl.cam.ac.uk <iap10@freefall.cl.cam.ac.uk>
Mon, 18 Apr 2005 21:59:22 +0000 (21:59 +0000)
add in kern.mk to sparse tree to disable compiling with -std=c99
anonymous unions (used in xen public headers) are not compliant
Signed-off-by: Kip Macy <kmacy@fsmware.com>
Signed-off-by: ian@xensource.com
.rootkeys
freebsd-5.3-xen-sparse/conf/kern.mk [new file with mode: 0644]

index 37c455d2bdcfa9d1e80035459f21993d2d4cff87..e57d34ae76761b96e47ea1a9cf7fd5c0dfceb6e1 100644 (file)
--- a/.rootkeys
+++ b/.rootkeys
@@ -45,6 +45,7 @@
 3f815145xlKBAQmal9oces3G_Mvxqw extras/mini-os/traps.c
 423e7e86yUUeeOvTAmjIahrpk1ksaQ freebsd-5.3-xen-sparse/conf/Makefile.i386-xen
 423e7e86CSWbA9G8OftmMbfhStuQ6Q freebsd-5.3-xen-sparse/conf/files.i386-xen
+42642db9m5qcqIrsHX8QlcBGeKSAmw freebsd-5.3-xen-sparse/conf/kern.mk
 423e7e86m-vV5fQ_32CjcFMEr77Fyg freebsd-5.3-xen-sparse/conf/ldscript.i386-xen
 423e7e86Fo2PxRS_37IwkpH-x5t5xQ freebsd-5.3-xen-sparse/conf/options.i386-xen
 423e7e868Yt0iZuEeccnczyToPPvow freebsd-5.3-xen-sparse/fbsdxensetup
diff --git a/freebsd-5.3-xen-sparse/conf/kern.mk b/freebsd-5.3-xen-sparse/conf/kern.mk
new file mode 100644 (file)
index 0000000..b5e85e6
--- /dev/null
@@ -0,0 +1,100 @@
+# $FreeBSD: src/sys/conf/kern.mk,v 1.42 2004/05/14 13:35:46 cognet Exp $
+
+#
+# Warning flags for compiling the kernel and components of the kernel.
+#
+# Note that the newly added -Wcast-qual is responsible for generating 
+# most of the remaining warnings.  Warnings introduced with -Wall will
+# also pop up, but are easier to fix.
+.if ${CC} == "icc"
+#CWARNFLAGS=   -w2     # use this if you are terribly bored
+CWARNFLAGS=
+.else
+CWARNFLAGS?=   -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
+               -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
+               -fformat-extensions 
+.endif
+# -std=c99 anonymous unions are non-compliant
+#
+# The following flags are next up for working on:
+#      -W
+
+#
+# On the i386, do not align the stack to 16-byte boundaries.  Otherwise GCC
+# 2.95 adds code to the entry and exit point of every function to align the
+# stack to 16-byte boundaries -- thus wasting approximately 12 bytes of stack
+# per function call.  While the 16-byte alignment may benefit micro benchmarks, 
+# it is probably an overall loss as it makes the code bigger (less efficient
+# use of code cache tag lines) and uses more stack (less efficient use of data
+# cache tag lines)
+#
+.if ${MACHINE_ARCH} == "i386" && ${CC} != "icc"
+CFLAGS+=       -mno-align-long-strings -mpreferred-stack-boundary=2
+INLINE_LIMIT?= 8000
+.endif
+
+#
+# On the alpha, make sure that we don't use floating-point registers and
+# allow the use of BWX etc instructions (only needed for low-level i/o).
+# Also, reserve register t7 to point at per-cpu global variables.
+#
+.if ${MACHINE_ARCH} == "alpha"
+CFLAGS+=       -mno-fp-regs -ffixed-8 -Wa,-mev6
+INLINE_LIMIT?= 15000
+.endif
+
+.if ${MACHINE_ARCH} == "arm"
+INLINE_LIMIT?= 8000
+.endif
+#
+# For IA-64, we use r13 for the kernel globals pointer and we only use
+# a very small subset of float registers for integer divides.
+#
+.if ${MACHINE_ARCH} == "ia64"
+CFLAGS+=       -ffixed-r13 -mfixed-range=f32-f127 -mno-sdata
+INLINE_LIMIT?= 15000
+.endif
+
+#
+# For sparc64 we want medlow code model, and we tell gcc to use floating
+# point emulation.  This avoids using floating point registers for integer
+# operations which it has a tendency to do.
+#
+.if ${MACHINE_ARCH} == "sparc64"
+CFLAGS+=       -mcmodel=medlow -msoft-float
+INLINE_LIMIT?= 15000
+.endif
+
+#
+# For AMD64, use a medium model for now.  We'll switch to "kernel"
+# once pmap is ready.  Be excessively careful to not generate FPU code.
+#
+.if ${MACHINE_ARCH} == "amd64"
+CFLAGS+=       -mcmodel=kernel -mno-red-zone \
+               -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx -mno-3dnow \
+               -msoft-float -fno-asynchronous-unwind-tables
+INLINE_LIMIT?= 8000
+.endif
+
+#
+# For PowerPC we tell gcc to use floating point emulation.  This avoids using
+# floating point registers for integer operations which it has a tendency to do.
+#
+.if ${MACHINE_ARCH} == "powerpc"
+CFLAGS+=       -msoft-float
+INLINE_LIMIT?= 15000
+.endif
+
+#
+# GCC 3.0 and above like to do certain optimizations based on the
+# assumption that the program is linked against libc.  Stop this.
+#
+.if ${CC} == "icc"
+CFLAGS+=       -nolib_inline
+.else
+CFLAGS+=       -ffreestanding
+.endif
+
+.if ${CC} == "icc"
+CFLAGS+=       -restrict
+.endif